package com.android.lovingpet.mine.setting;

import com.android.lovingpet.base.BasePresenter;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

public class SettingPresenter extends BasePresenter<ISettingContract.View> implements ISettingContract.Presenter {

    private SettingModel model;

    public SettingPresenter() {
        model = new SettingModel();
    }

    @Override
    public void logout() {
        model.logout(new Callback() {
            @Override
            public void onFailure(Call call, IOException e) {

            }

            @Override
            public void onResponse(Call call, Response response) throws IOException {
                response.close();//关闭流
            }
        });
    }
}
